package com.yf1706.bean;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;


/**
 * The persistent class for the emp_attachment database table.
 * 
 */
@Entity
@Table(name="emp_attachment")
@NamedQuery(name="EmpAttachment.findAll", query="SELECT e FROM EmpAttachment e")
public class EmpAttachment implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="attachment_id")
	private int attachmentId;

	@Column(name="attachment_address")
	private String attachmentAddress;

	@Column(name="attachment_type")
	private String attachmentType;

	private String remark;

	//bi-directional many-to-one association to Emp
	@ManyToOne
	@JSONField(serialize=false)
	@JoinColumn(name="emp_id")
	private Emp emp;

	public EmpAttachment() {
	}

	@Override
	public String toString() {
		return "EmpAttachment [attachmentId=" + attachmentId + ", attachmentAddress=" + attachmentAddress
				+ ", attachmentType=" + attachmentType + ", remark=" + remark + "]";
	}

	public EmpAttachment(String attachmentAddress, String attachmentType, String remark) {
		super();
		this.attachmentAddress = attachmentAddress;
		this.attachmentType = attachmentType;
		this.remark = remark;
	}

	public int getAttachmentId() {
		return this.attachmentId;
	}

	public void setAttachmentId(int attachmentId) {
		this.attachmentId = attachmentId;
	}

	public String getAttachmentAddress() {
		return this.attachmentAddress;
	}

	public void setAttachmentAddress(String attachmentAddress) {
		this.attachmentAddress = attachmentAddress;
	}

	public String getAttachmentType() {
		return this.attachmentType;
	}

	public void setAttachmentType(String attachmentType) {
		this.attachmentType = attachmentType;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Emp getEmp() {
		return this.emp;
	}

	public void setEmp(Emp emp) {
		this.emp = emp;
	}

}